<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>有奖答题平台</title>
	<!-- ICON -->
	<link href="/frame/images/meatball.ico" type="image/ico" rel="shortcut icon">
	<!-- CSS -->
	<link rel="stylesheet" href="/lib/layuiadmin/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="/lib/layuiadmin/css/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-card-body">
			<div class="layui-row">
				<div class="layui-md12">
					<form class="layui-form" id="queryForm" style="float: right;">
						<div class="layui-inline">
							<input type="text" name="description" title="描述" placeholder="请输入操作描述" autocomplete="off" class="layui-input">
						</div>
						<button class="layui-btn" lay-submit lay-filter="query">
							<i class="layui-icon">&#xe615;</i> 查询
						</button>
					</form>
				</div>
				<hr class="layui-bg-gray">
				<div class="layui-col-md12">
					<!-- 表格 -->
					<table id="table" lay-filter="table"></table>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- JavaScript -->
<script type="text/javascript" src="/lib/layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="/frame/js/DateUtil.js"></script>
<!-- javascirpt -->
<script th:inline="javascript">  
	var roleMenuTree = [[${roleMenuTree}]];
</script>
<script type="text/javascript" th:inline="none">
layui.config({
	base: '/lib/layuiadmin/' //静态资源所在路径
}).extend({
	index: 'lib/index', //主入口模块
}).use(['index', 'ztree', 'ztreecheck'], function() {
	var table = layui.table,
		form = layui.form,
		element = layui.element,
		laytpl = layui.laytpl,
		$ = layui.jquery,
		ztree = layui.ztree,
		checkedMenu = -1,
		layerIndex = 1;

	// 绘制表格
	table.render({
		elem: '#table',
		url: '/system/log/table',
		page: true, // 开始分页
		// cellMinWidth: 80, // 定义全局最小宽度
		request: {
			pageName: 'offset'
		},
		response: {
			statusCode: 10000
		  // countName: 'total', //数据总数的字段名称，默认：count
		  // dataName: 'list' //数据列表的字段名称，默认：data
		},
		cols: [[
			{type: 'numbers', title: '序号'},
			{field:'operateUser', title: '用户账号', width: 100},
			{field:'requestIp', title: 'IP地址', width: 180},
			{field:'operateDate', title: '时间', width: 180},
			{field:'description', title: '详情', width: 200},
			{field:'method', title: '调用方法', width: 180},
            {field:'params', title: '参数', width: 180},
            {field:'exceptionDetail', title: '异常信息', width: 180}
		]]
	});
	//监听工具条
    // 查询用户
    form.on('submit(query)', function(data) {
        table.reload('table', {
            where: data.field
        });
        return false;
    })


});
</script>
</body>
</html>